package com.example.pcl.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 通知表，存储与用户和心理咨询师相关的各种预约通知
 * </p>
 *
 * @author xx
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("notifications")
@Schema(name = "Notifications对象", description = "通知表，存储与用户和心理咨询师相关的各种预约通知")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Notifications implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "通知ID")
    @TableId(value = "notification_id", type = IdType.AUTO)
    private Integer notificationId;

    @Schema(description = "通知标题")
    private String title;

    @Schema(description = "通知内容")
    private String content;

    @Schema(description = "接收者用户ID")
    private Integer recipientId;

    @Schema(description = "通知状态 (0: 未读, 1: 已读, 2: 已删除)")
    private Integer notificationStatus;

    @Schema(description = "过期时间")
    private LocalDateTime expirationTime;

    @Schema(description = "关联预约ID")
    private Integer appointmentId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;


    public static final Integer UNREAD = 0;
    public static final Integer READ = 1;
    public static final Integer DELETED = 2;

}
